package com.hl.domain;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 文章表，存储所有文章信息
 * @TableName article
 */
@Data
public class Article implements Serializable {
    /**
     * 主键，自增
     */
    private Long id;

    /**
     * 文章名
     */
    private String articlename;

    /**
     * 文章简介
     */
    private String articleintroduce;

    /**
     * 咨询师id，外键关联teacher表
     */
    private Long teacherId;

    /**
     * 列表图，存储URL网址
     */
    private String tabularchart;

    /**
     * 详情内容，用于存储富文本编辑器的内容
     */
    private String details;

    /**
     * 阅读量
     */
    private Integer readquantity;

    /**
     * 收藏量
     */
    private Integer collects;

    /**
     * 
     */
    private Long typeId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date createtime;

    private static final long serialVersionUID = 1L;

    public Article(Long id, String articlename, String articleintroduce, String tabularchart, String details, Integer readquantity, Integer collects, Date createtime) {
        this.id = id;
        this.articlename = articlename;
        this.articleintroduce = articleintroduce;
        this.tabularchart = tabularchart;
        this.details = details;
        this.readquantity = readquantity;
        this.collects = collects;
//        this.createtime = createtime;
    }

    public Article(Long id,String articlename, String articleintroduce, String details) {
        this.id = id;
        this.articlename = articlename;
        this.articleintroduce = articleintroduce;
        this.details = details;
    }

    public Article() {
    }
}